from flask import Flask, render_template
from settings import Config, db
from models import House, Recommend, User
from index_page import index_page

app = Flask(__name__)
app.config.from_object(Config)
db.init_app(app)

app.register_blueprint(index_page, url_prefix='/')   # 注册蓝图index_page


# @app.route('/')
# # def test():
# #     return render_template('index.html')
# def test():
#     # 查询第一条记录
#     first_user = House.query.first()
#     print(first_user)
#     return 'OK'


if __name__ == '__main__':
    app.run(debug=True)
